﻿@model SimplCommerce.Module.Catalog.Areas.Catalog.ViewModels.ProductThumbnail

<div class="block2">
    <div class="block2-pic hov-img0">
        <img alt="@Model.Name" class="card-img-top" src="@Model.ThumbnailUrl">

        <a href="~/@Model.Slug" class="block2-btn flex-c-m stext-103 cl2 size-102 bg0 bor2 hov-btn1 p-lr-15 trans-04">
            View Details
        </a>
    </div>

        <div class="block2-txt flex-w flex-t p-t-14">
            <div class="block2-txt-child1 flex-col-l ">
                <a href="~/@Model.Slug" class="stext-104 cl4 hov-cl1 trans-04 js-name-b2 p-b-6">
                    @Model.Name
                </a>

                <span class="stext-105 cl3">
                    @if (Model.IsCallForPricing)
                    {
                        @Localizer["Call for pricing"]
                    }
                    else
                    {
                        @Model.CalculatedProductPrice.Price.ToString("C")
                        if (Model.CalculatedProductPrice.PercentOfSaving > 0)
                        {
                            <span class="product-price-saving">-@(Model.CalculatedProductPrice.PercentOfSaving)%</span>
                            <br />
                            <span class="product-price-regular">@Model.CalculatedProductPrice.OldPrice.Value.ToString("C")</span>
                        }
                    }
                </span>
            </div>

            <div class="block2-txt-child2 flex-r p-t-3">
                <ul class="list-inline product-ratings">
                    <li><input type="hidden" value="@Model.RatingAverage" readonly="readonly" class="rating-loading" step="1" data-size="xs" data-show-clear="false" data-show-caption="false" /></li>
                    @if (Model.ReviewsCount > 0)
                    {
                        <li class="product-review-list">
                            <span>(@Model.ReviewsCount @Localizer["reviews"])</span>
                        </li>
                    }
                </ul>
            </div>
        </div>
</div>
